
package dieci.hibernate;

import dieci.database.PersistentObject;

/**
 *
 * @author DuckSys
 */
public class HibOrderDetailId implements PersistentObject{

    private Long orderId;
    private Long productId;

    public HibOrderDetailId()
    {
    }

    public HibOrderDetailId(Long orderId, Long productId)
    {
        this.orderId = orderId;
        this.productId = productId;
    }
        
    
    /**
     * Get the value of orderId
     *
     * @return the value of orderId
     */
    public Long getOrderId()
    {
        return orderId;
    }

    /**
     * Set the value of orderId
     *
     * @param orderId new value of orderId
     */
    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    
    @Override
    public boolean equals (Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof HibOrderDetailId))
            return false;
        final HibOrderDetailId other = (HibOrderDetailId) obj;
        if (!this.getOrderId().equals(other.getOrderId()))
            return false;
        if (!this.getProductId().equals(other.getProductId()))
            return false;
        return true;
    }

    @Override
    public int hashCode ()
    {
        int hash = 7;
        hash = 61 * hash + (int) (this.getOrderId() ^ (this.getOrderId() >>> 32));
        hash = 61 * hash + (int) (this.getProductId().hashCode() ^ (this.getProductId().hashCode() >>> 31));
        return hash;
    }

}
